<div class="col-sm-12">
	<div class="box margin-middle max-width">
		<!-- BOX-BODY -->
		<div class="box-body">
      {{#bs-form formLayout=formLayout model=leaveModel invalid=(action "invalid")}}
			<div class="row">
				<div class="col-xs-12">
					<p class="user-add-btn">
						{{#if detailEdit}}
						{{else}}
							{{#if allowEdit}}
								{{#ui/icon-button class="user-btn edit-btn incon-button-font pull-right" iconClass="fa fa-trash-o"  text='删除'
										clickAction="deleteAction" deleteAction="deleteAction"}}
								  	{{bs-tooltip title="删除" class="light-tooltip"}}
								{{/ui/icon-button}}
								{{#ui/icon-button class="user-btn edit-btn incon-button-font pull-right" iconClass="fa fa-edit"  text='编辑'
										clickAction="editAction" editAction="editAction"}}
								   {{bs-tooltip title="编辑" class="light-tooltip"}}
								{{/ui/icon-button}}
							{{/if}}
						{{/if}}
					</p>
				</div>
				<!-- 列表详细介绍 -->
				<div class="col-xs-12 nopadding-left">
					<div class="col-xs-12 nopadding-horizontal mt20">
						<div class="col-xs-12 col-sm-6">
							<div class="form-input-group">
							<span class="input-group-addon">老人姓名：</span>
								{{#if detailEdit}}
									{{#bs-form-element class="inline-block form-input-group" controlType="customer" property="customer" }}
									{{#power-select class="input-group-content" placeholder='必选项' options=customerList  selected=leaveModel.customer searchField="name"
										noMatchesMessage="没有相关老人信息"	allowClear=false	onchange=(action "customerSelect" ) as |customer|}}
										{{customer.name}}
									{{/power-select}}
									{{/bs-form-element}}
								{{else}}
									<div class="input-group-content">{{leaveModel.customer.name}}</div>
								{{/if}}
							</div>
						</div>
						<div class="col-xs-12 col-sm-6">
							<div class="form-input-group">
								<span class="input-group-addon">请假日期：</span>
								{{#if detailEdit}}
								{{#bs-form-element class="inline-block form-input-group" controlType="startTime" property="startTime" }}
										{{ui/addon/bs-datetimepicker date=leaveModel.startTimeDate placeholder="必填项"
											locale="zh-CN" iconClasses="fa fa-calendar" format='YYYY-MM-DD'
												show="doNothing" change="changeStartTime" }}
								{{/bs-form-element}}
								{{else}}
									<div class="input-group-content">{{leaveModel.startTimeStr}}</div>
								{{/if}}
							</div>
						</div>
            <div class="col-xs-12 col-sm-6">
              <div class="form-input-group">
                <span class="input-group-addon">预计销假日期：</span>
                {{#if detailEdit}}
                {{#bs-form-element class="inline-block form-input-group" controlType="expectEndTime" property="expectEndTime" }}
                    {{ui/addon/bs-datetimepicker date=leaveModel.expectEndTimeDate  minDate=leaveModel.startTimeDate
                      locale="zh-CN" iconClasses="fa fa-calendar" format='YYYY-MM-DD'
                        show="doNothing" change="changeExpectEndTime" }}
                {{/bs-form-element}}
                {{else}}
                  <div class="input-group-content">{{leaveModel.expectEndTimeStr}}</div>
                {{/if}}
              </div>
            </div>
						{{#unless detailEdit}}
            <div class="col-xs-12 col-sm-6">
              <div class="form-input-group">
                <span class="input-group-addon">实际销假日期：</span>
                  <div class="input-group-content">{{leaveModel.endTimeStr}}</div>
              </div>
            </div>
						{{/unless}}
            <div class="col-xs-12 col-sm-6">
              <div class="form-input-group">
                <span class="input-group-addon">请假原因：</span>
                {{#if detailEdit}}
                {{#bs-form-element class="inline-block form-input-group label-normal" controlType="leaveReason" property="leaveReason" }}
                    {{callbusi/dict-selector curDict=leaveModel.leaveReason groupCode='customerLeaveReason' showName="请假原因"
                    dictSelect="leaveReasonSelect" value=leaveModel.leaveReason preselected=false}}
                {{/bs-form-element}}
                {{else}}
                  <div class="input-group-content">{{leaveModel.leaveReason.typename}}</div>
                {{/if}}
              </div>
            </div>
            {{#unless detailEdit}}
              <div class="col-xs-12 col-sm-6">
                <div class="form-input-group">
                  <span class="input-group-addon">请假状态：</span>
                    <div class="input-group-content">{{leaveModel.statusStr}}</div>
                </div>
              </div>
            {{/unless}}
						<div class="col-xs-12 col-sm-12">
							<div class="form-input-group">
								<span class="input-group-addon">备注：</span>
								{{#if detailEdit}}
									{{textarea type="text" class="full-width inline-block form-input-group label-normal form-control" value=leaveModel.remark}}
								{{else}}
									<div class="input-group-content">{{leaveModel.remark}}</div>
								{{/if}}
							</div>
						</div>
					</div>
				</div>
				<div class="center">
					<p class="text-center user-add-btn padding-top30 inlineBlock margin0auto">
						{{#if detailEdit}}
							{{#ui/mix-button class="user-btn edit-btn body-text-color" iconClass="fa fa-check"  text='保存' clickAction="saveAction" saveAction="saveAction"  clickActParams=leaveModel}}
							{{/ui/mix-button}}
							{{#ui/mix-button class="user-btn times-btn body-text-color" iconClass="fa fa-mail-reply"  text='取消'  clickAction="detailCancel" detailCancel="detailCancel" }}
							{{/ui/mix-button}}
						{{/if}}
					</p>
				</div>
				<!-- 列表详细介绍 -->
			</div>
      {{/bs-form}}
		</div>
		<!-- /BOX-BODY -->
	</div>
</div>
